package com.komodo.island.gdx.game.kodomosuit;

import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.komodo.island.gdx.AnimatedSprite;

public class PlayerKomodo extends AnimatedSprite {

	public final static int WIN = 2;
	public final static int LOSE = 0;
	public final static int DRAW = 1;

	public int state;
	public int counter;
	public int limit;
	int frameNumber; 

	public PlayerKomodo(TextureRegion[] frames, int limit) {
		super(frames);
		// TODO Auto-generated constructor stub

		counter = 0;
		this.limit = limit;
	}

	@Override
	public void nextKey(float stateTime) {
		// TODO Auto-generated method stub
	
//		if (counter <1){
			frame = animation.getKeyFrame(stateTime, true);
			this.setRegion(frame);
//			if (frameNumber % limit ==0){
//				counter++;
//			}
////			
//		}else{
//			frameNumber= (int) (stateTime / animation.frameDuration);
//		}

	}

	public void startKey(int limit) {
		 counter = 0;
		 this.limit = limit;
		// animation = new Animation(0.25f, defaultFrames);
		this.setRegion(defaultFrames[0]);
	}

}
